package com.yanqu.road.logic.bussiness.crossbanquet;

import com.yanqu.road.entity.banquet.baifubanquet.GoodBanquetData;
import com.yanqu.road.entity.banquet.baifubanquet.GoodBanquetJoinInfoData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;

/**
 * @Description 百福宴
 * @Author cwq
 * @Data 2021/11/15 14:16
 */
public class CrossGoodBanquetBussiness {

    // GoodBanquetData
    public static List<GoodBanquetData> getGoodBanquetDataList(int activityId){
        return DaoHelper.getCrossGoodBanquetDaoImpl().getGoodBanquetData(activityId);
    }

    public static boolean addGoodBanquetData(GoodBanquetData item){
        return DaoHelper.getCrossGoodBanquetDaoImpl().add(item);
    }

    public static boolean updateGoodBanquetData(GoodBanquetData item){
        return DaoHelper.getCrossGoodBanquetDaoImpl().update(item);
    }

    //GoodBanquetJoinInfoData
    public static List<GoodBanquetJoinInfoData> getGoodBanquetJoinInfoList(int activityId){
        return DaoHelper.getCrossGoodBanquetJoinDaoImpl().getGoodBanquetJoinInfoList(activityId);
    }

    public static boolean addGoodBanquetJoinInfoData(GoodBanquetJoinInfoData item){
        return DaoHelper.getCrossGoodBanquetJoinDaoImpl().add(item);
    }

    public static boolean updateGoodBanquetJoinInfoData(GoodBanquetJoinInfoData item){
        return DaoHelper.getCrossGoodBanquetJoinDaoImpl().update(item);
    }

    public static boolean updateGoodBanquetJoinInfoDataList(List<GoodBanquetJoinInfoData> list) {
        return DaoHelper.getCrossGoodBanquetJoinDaoImpl().batchUpdate(list);
    }

    public static boolean addGoodBanquetJoinInfoDataList(List<GoodBanquetJoinInfoData> list) {
        return DaoHelper.getCrossGoodBanquetJoinDaoImpl().batchAdd(list);
    }


    public static long getMaxGoodBanquetId(){
        return DaoHelper.getCrossGoodBanquetDaoImpl().getMaxRecordId();
    }

}
